package com.charger.mapper;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.charger.domain.ChargerEnergy;
import com.charger.domain.ChargerEnergyMiddle;
import com.charger.domain.ChargerOperationMiddle;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 能耗分析Mapper接口
 * 
 * @author qkp
 * @date 2024-11-22
 */
public interface ChargerEnergyMapper extends BaseMapper<ChargerEnergy>
{
    /**
     * 查询能耗分析
     * 
     * @param energyId 能耗分析主键
     * @return 能耗分析
     */
    public ChargerEnergy selectChargerEnergyByEnergyId(Long energyId);

    /**
     * 查询能耗分析列表
     * 
     * @param chargerEnergy 能耗分析
     * @return 能耗分析集合
     */
    public List<ChargerEnergy> selectChargerEnergyList(ChargerEnergy chargerEnergy);

    /**
     * 新增能耗分析
     * 
     * @param chargerEnergy 能耗分析
     * @return 结果
     */
    public int insertChargerEnergy(ChargerEnergy chargerEnergy);

    /**
     * 修改能耗分析
     * 
     * @param chargerEnergy 能耗分析
     * @return 结果
     */
    public int updateChargerEnergy(ChargerEnergy chargerEnergy);

    /**
     * 删除能耗分析
     * 
     * @param energyId 能耗分析主键
     * @return 结果
     */
    public int deleteChargerEnergyByEnergyId(Long energyId);

    /**
     * 批量删除能耗分析
     * 
     * @param energyIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteChargerEnergyByEnergyIds(Long[] energyIds);


    public List<ChargerEnergy> selectByDayAndTime(@Param("day") String day,
                                                  @Param("startTime") String startTime,
                                                  @Param("endTime") String endTime);

    public List<ChargerEnergyMiddle> selectByTime(Map map);

    @Select("select charger_id from charger where chargingStation_id = #{stationId}")
    public List<Integer> getIdsByStationId(Integer stationId);

}
